package com.yunhe.spring;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ZuoYongYu {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("beans2.xml");
        A a = (A) context.getBean("a");
        A a1 = context.getBean(A.class);
        A a2 = context.getBean(A.class);
        System.out.println(a==a1);
        System.out.println(a==a2);
    }
}
